import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Index from '../views/Index.vue'
import Outpatient from '../views/outpatient.vue'
import UserManage from '../views/manage/usermanage.vue'
import GuestBook from '../views/manage/guestbook.vue'
import PublishContent from '../views/manage/contentmanage/publishconent.vue'
import QueryContent from '../views/manage/contentmanage/querycontent.vue'
import UserIndex from '../views/userIndex.vue'
import PersonalIndex from '../views/user/personalIndex.vue'
import UserAdd from '../views/user/UserAdd.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/userIndex'
  },
  {
    path: '/Login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/Index',
    name: 'Index',
    component: Index,
	children:[
		{
			path:'/manage/usermanage',
			name:'usermanage',
			component:UserManage
		},
		{
			path:'/manage/guestbook',
			name:'guestbook',
			component:GuestBook
		},
		{
			path:'/manage/contentmanage/publishcontent',
			name:'publishcontent',
			component:PublishContent
		},
		{
			path:'/manage/contentmanage/querycontent',
			name:'querycontent',
			component:QueryContent
		},
	]
  },
  {
    path: '/userIndex',
    name: 'userIndex',
    component: UserIndex,
  },
  {
	path: '/personalIndex',
    name: 'personalIndex',
    component: PersonalIndex,
  },
  {
    path: '/UserAdd',
      name: 'UserAdd',
      component: UserAdd,
    }
]

const router = new VueRouter({
  routes
})

export default router
